#ifndef __SETTING_MANAGER_H__
#define __SETTING_MANAGER_H__

#define IP_LEN 32
#define PASSWORD_LEN 100
#define COMMON_LEN 128

#define DEVICE_NAME		"KVM"

#define LOG_LEVEL_ERROR		1
#define LOG_LEVEL_WARNING	2
#define LOG_LEVEL_INFO		3
#define LOG_LEVEL_DEBUG		4

typedef enum ip_addressing_t
{
	IP_ADDRESSING_Static,
	IP_ADDRESSING_DHCP,
}ipAddressing;

typedef enum input_Source_t
{
	INPUT_SOURCE_IP,
	INPUT_SOURCE_SRT,
	INPUT_SOURCE_RTSP,
}inputSource;

typedef enum ip_RecvMode_t
{
	IP_RECVMODE_UNICAST,
	IP_RECVMODE_MULTICAST,
}ipRecvMode;

typedef enum srt_Mode_t
{
	SRT_MODE_CALLER,
	SRT_MODE_LISTENER,
}srtMode;

typedef enum srt_Encrpyt_t
{
	SRT_ENCRPYT_NONE,
	SRT_ENCRPYT_AES_128,
	SRT_ENCRPYT_AES_192,
	SRT_ENCRPYT_AES_256,
}srtEncrpyt;

typedef enum decoder_HdrMode_t
{
	DECODER_HDRMODE_AUTO,
	DECODER_HDRMODE_SDR,
	DECODER_HDRMODE_HLG,
}decoderHdrMode;

typedef enum decoder_LatencyMode_t
{
	DECODER_LATENCYMODE_AUTO,
	DECODER_LATENCYMODE_NORMAL,
	DECODER_LATENCYMODE_LOW,
}decoderLatencyMode;

typedef enum decoder_audioswitch_t
{
	DECODER_AUDIOSWITCH_OFF,
	DECODER_AUDIOSWITCH_ON,
}decoderAudioSwitch;

typedef enum decoder_OutputFormat_t
{
	OUTPUT_FORMAT_AUTO = 0,

	OUTPUT_FORMAT_720P50 = 3,
	OUTPUT_FORMAT_720P60 = 4,
	OUTPUT_FORMAT_720P5994 = 5,

	OUTPUT_FORMAT_1080I50 = 6,
	OUTPUT_FORMAT_1080I5994 = 7,
	OUTPUT_FORMAT_1080I60 = 8,

	OUTPUT_FORMAT_1080P2398 = 9,
    OUTPUT_FORMAT_1080P24 = 10,
	OUTPUT_FORMAT_1080P25 = 11,
	OUTPUT_FORMAT_1080P2997 = 12,
	OUTPUT_FORMAT_1080P30 = 13,
	OUTPUT_FORMAT_1080P50 = 14,
	OUTPUT_FORMAT_1080P5994 = 15,
	OUTPUT_FORMAT_1080P60 = 16,

	OUTPUT_FORMAT_720P23 = 17,
	OUTPUT_FORMAT_720P24 = 18,
	OUTPUT_FORMAT_720P25 = 19,
	OUTPUT_FORMAT_720P29 = 20,
	OUTPUT_FORMAT_720P30 = 21,

	OUTPUT_FORMAT_2160P25 = 22,
	OUTPUT_FORMAT_2160P29 = 23,
	OUTPUT_FORMAT_2160P30 = 24,
	OUTPUT_FORMAT_2160P50 = 25,
	OUTPUT_FORMAT_2160P59 = 26,
	OUTPUT_FORMAT_2160P60 = 27,
}decoderOutputFormat;

typedef enum fmt_value_e
{
	fmt_value_nv12,
	fmt_value_nv16,
	fmt_value_xv20
}fmt_value;

typedef enum gdrmode_value_e
{
	gdrmode_true,
	gdrmode_false
}gdrmode_value;

typedef enum video_mode_e
{
	mode_h264,
	mode_h265
}video_mode_value;

void default_setting_init();
//network----------
int get_ip_addressing_setting(int *val);
int set_ip_addressing_setting(int val);

int get_ctrl_ipaddr_setting(char *ip_addr);
int set_ctrl_ipaddr_setting(char *ip_addr);

int get_ctrl_mask_setting(char *mask);
int set_ctrl_mask_setting(char *mask);

int get_ctrl_gateway_setting(char *gateway);
int set_ctrl_gateway_setting(char *gateway);

int get_stream_ipaddr_setting(char *ip_addr);
int set_stream_ipaddr_setting(char *ip_addr);

int get_stream_mask_setting(char *mask);
int set_stream_mask_setting(char *mask);

int get_stream_gateway_setting(char *gateway);
int set_stream_gateway_setting(char *gateway);

//output------------
int get_input_source_setting(int *val);
int set_input_source_setting(int val);

int get_iprecv_mode_setting(int *val);
int set_iprecv_mode_setting(int val);

int get_ip_port_setting(int *val);
int set_ip_port_setting(int val);

int get_ip_multicastaddr_setting(char *addr);
int set_ip_multicastaddr_setting(char *addr);

int get_ip_unicastaddr_setting(char *addr);
int set_ip_unicastaddr_setting(char *addr);

int get_rtspaddr_setting(char *addr);
int set_rtspaddr_setting(char *addr);

int get_srt_mode_setting(int *val);
int set_srt_mode_setting(int val);

int get_srt_calleraddr_setting(char *addr);
int set_srt_calleraddr_setting(char *addr);

int get_srt_port_setting(int *val);
int set_srt_port_setting(int val);

int get_srt_latency_setting(int *val);
int set_srt_latency_setting(int val);

int get_srt_encrpyt_setting(int *val);
int set_srt_encrpyt_setting(int val);

int get_srt_password_setting(char *passwd);
int set_srt_password_setting(char *passwd);

//vcu-----------start--------
int get_video_fmt_setting(int *val); 
int set_video_fmt_setting(int value);

int get_video_gdrmode_setting(int *val);
int set_video_gdrmode_setting(int value);

int get_video_gop_setting(int *val);
int set_video_gop_setting(int val);

int get_video_mode_setting(int *val);
int set_video_mode_setting(int val);

int get_video_framerate_setting(int *val);
int set_video_framerate_setting(int val);

int get_video_height_setting(int *val);
int set_video_height_setting(int val);

int get_video_width_setting(int *val);
int set_video_width_setting(int val);

int set_decoder_audioswitch_setting(int val);
int get_decoder_audioswitch_setting(int *val);

int set_decoder_bitrate_setting(int val);
int get_decoder_bitrate_setting(int *val);

//wifi----system----------

int get_decoder_username_setting(char *user);
int set_decoder_username_setting(char *user);

int get_decoder_password_setting(char *pass);
int set_decoder_password_setting(char *pass);

int get_ping_address_setting(char *addr);
int set_ping_address_setting(char *addr);

int get_wifi_switch_setting(int *val);
int set_wifi_switch_setting(int val);

int get_wifi_name_setting(char *pass);
int set_wifi_name_setting(char *pass);

int get_wifi_passwd_setting(char *pass);
int set_wifi_passwd_setting(char *pass);


/************************** Add the access serial number and mac address from here **************************/
int get_mac_address_setting(char *mac);
int get_serial_number_setting(char *serial);
int get_decoder_device_showname_setting(char *val);
int get_decoder_fpga_version_setting(char *val);
int get_decoder_app_version_setting(char *val);
int get_zynqmp_cpu_temp_value();
int get_kvm_passwd_setting(char *val);
int get_kvm_username_setting(char *val);
#endif

